<include file="Public/min-header" />
<div class="wrapper">
	<include file="Public/breadcrumb"/>
	<section class="content">
       <div class="row">
       		<div class="col-xs-12">
	       		<div class="box">
	             <div class="box-header">
	               	<nav class="navbar navbar-default">	     
				        <div class="collapse navbar-collapse">
				          <form class="navbar-form form-inline" action="{:U('Store/store_list')}" method="post">
				           	<div class="form-group">
				            	<label class="control-label" for="input-order-id">所属等级</label>
				            	 <select name="grade_id" class="form-control">
                                      <volist name="store_grade" id="item" key="k">
                                            <option value="{$k}" <if condition="$pid eq $k">selected</if>>{$item}</option>
                                      </volist>                  
                                 </select>   
				            </div>
				           <div class="form-group">
				              	<input type="text" name="seller_name" class="form-control" placeholder="请输入店主名称">
				            </div>
				            <div class="form-group">
				            	<label class="control-label" for="input-order-id">店铺状态</label>
				            	 <select name="pid" class="form-control">
				            	 	   <option>选择状态</option>
									   <option value="1">开启</option>
				            	 	   <option value="2">关闭</option>
                                       <option value="3">即将到期</option>
                                       <option value="4">已到期</option>
                                 </select>   
				            </div>
				           	<div class="form-group">
				            	<label class="control-label" for="input-order-id">店铺类别</label>
				            	 <select name="sc_id" class="form-control">
                                      <volist name="store_class" id="item" key="k">
                                          <option value="{$k}">{$item}</option>
                                      </volist>                  
                                 </select>   
				            </div>
				            <div class="form-group">
				              	<input type="text" name="store_name" class="form-control" placeholder="请输店铺名称">
				            </div>
				            <button type="submit" class="btn btn-primary">查询</button>
				            <div class="form-group pull-right">
					            <a href="{:U('Store/store_add')}" class="btn btn-primary pull-right"><i class="fa fa-plus"></i> 新增店铺</a>
				            </div>		          
				          </form>
				      	</div>
	    			</nav>
	    			<nav class="navbar navbar-default">	                          	
	    			   <div class="callout callout-inro">
							<p>1. 平台在此处统一管理自营店铺，可以新增、编辑、删除平台自营店铺。</p>
					        <p>2. 可以设置未绑定全部商品类目的平台自营店铺的经营类目。</p>
					        <p>3. 已经发布商品的自营店铺不能被删除。</p>
					        <p>4. 删除平台自营店铺将会同时删除店铺的相关图片以及相关商家中心账户，请谨慎操作！</p>
				        </div>
					</nav>	    			
	             </div>
	             <div class="box-body">
	           	 <div class="row">
	            	<div class="col-sm-12">
		              <table id="list-table" class="table table-bordered table-striped dataTable">
		                 <thead>
		                   <tr role="row">
                               <th>店铺名称</th>
                               <th>店主账号</th>
			                   <th>店主卖家账号</th>
                               <th>创建日期</th>
			                   <th>状态</th>
		                  	   <th>绑定所有类目</th>
		                  	   <th>操作</th>
		                   </tr>
		                 </thead>
						<tbody>
                          <foreach name="list" item="vo" key="k" >
                             <tr role="row">    
                             <td>{$vo.store_name}</td>
                             <td>{$vo.user_name}</td>
		                     <td>{$vo.seller_name}</td>                                    
		                     <td>{$vo.store_time|date='Y-m-d',###}</td>
		                     <td><if condition="$vo[store_state] eq 1">开启<else/>关闭</if></td>
		                     <td><if condition="$vo[bind_all_gc] eq 1">是<else/>否</if></td>
		                     <td>
							 <a class="btn btn-info" href="/index.php/Seller/Admin/login/store_id/{$vo['store_id']}"  target="_blank" >管理</a>
		                      <a class="btn btn-primary" href="{:U('Store/store_edit',array('store_id'=>$vo['store_id']))}"><i class="fa fa-pencil"></i></a>
		                      <a class="btn btn-danger" onclick="delfunc(this)" data-url="{:U('Store/store_del')}" data-id="{$vo.store_id}"><i class="fa fa-trash-o"></i></a>
				     		</td>
		                   </tr>
		                  </foreach>
		                   </tbody>
		                 <tfoot>
		                 
		                 </tfoot>
		               </table>
	               </div>
	          </div>
              <div class="row">
              	    <div class="col-sm-6 text-left">
              	    	<button class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
              	    </div>
                    <div class="col-sm-6 text-right">{$page}</div>		
              </div>
	          </div>
	        </div>
       	</div>
       </div>
   </section>
<script>

</script>
</div>
</body>
</html>